require "loader"
local json = require "json"


local function loadAllData()
    result={}
    for i=0,44 do
        if(i<15) then
            name="run"..i..".png"
        elseif i<=42 then
            name="roll"..(i-15)..".png"
        elseif i==43 then
            name="run0.png"
        else name = "run4.png"
        end    
        x,y,width,height=loader.getdata(name)
        --print ("x:"..x.."y:"..y.."width:"..width.."height:"..height)
        item={}
        item.x=x
        item.y=y
        item.width=width
        item.height=height
        result[i]=item
    end
    return result
    end

local data=loadAllData()
local sheetData={}
sheetData.frames={}
for i=0,44 do
    sheetData.frames[i]=
    {
                x = data[i].x,
		y = data[i].y,
		width = data[i].width,
		height = data[i].height,
		sourceX = 0,
		sourceY = 0,
		sourceWidth = data[i].width,
		sourceHeight = data[i].height,
    }
end 
return sheetData
